package com.zdyl.fileReplaceTool;

import com.zdyl.fileReplaceTool.Controler.Log4jControl;
import com.zdyl.fileReplaceTool.utils.JFrameUtils;
import org.apache.log4j.Logger;

import javax.swing.*;
import java.io.IOException;

/**
 * @version V1.0
 * @Title:
 * @Package
 * @Description:
 * @author: runoob
 * @date:
 */
public class Main {
    static Log4jControl log4jControl = new Log4jControl();
    public static Logger logger = Logger.getLogger(Main.class);
    public static boolean flag = false;

    public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                try {
                    createGUI();
                } catch (IOException e) {
                    e.printStackTrace();
                    logger.error(e);
                } catch (IllegalAccessException | InstantiationException | UnsupportedLookAndFeelException | ClassNotFoundException e) {
                    e.printStackTrace();
                }
            }
        });
    }

    private static void createGUI() throws IOException, ClassNotFoundException, UnsupportedLookAndFeelException, InstantiationException, IllegalAccessException {
        //设置窗口为windows风格
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        //创建一个窗口，创建一个窗口
        JFrameUtils frame = new JFrameUtils("文件字符串批量替换工具");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //设置窗口大小
        frame.setSize(500, 600);
        //设置窗口位置
        frame.setLocation(710, 390);
        //显示窗口
        frame.setVisible(true);

    }

}
